package cn.edu.zjut.service;

import cn.edu.zjut.entity.UserEntity;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author:ZhouDan
 * @date: 2020/5/24
 * @version: 1.0
 */
public interface IUserService extends UserDetailsService {
    @Override
    UserDetails loadUserByUsername(String s) throws UsernameNotFoundException;

    UserEntity getByUserName(String userName);

    UserEntity getByTelephone(String Telephone);

    UserEntity getByUserNameAndTelephone(String userName,String telephone);

    UserEntity login(String userName,String password);

    UserEntity getById(long id);

    UserEntity save(UserEntity userEntity);
}
